﻿    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title></title>
        <link href="__PUBLIC__/lib/ligerUI/skins/Aqua/css/ligerui-all.css" rel="stylesheet" type="text/css" />
        <link rel="stylesheet" type="text/css" href="__PUBLIC__/uploadify/uploadify.css"> 
        <style type="text/css"> 
            body{ padding:5px; margin:0; padding-bottom:15px;}
            #layout1{  width:100%;margin:0; padding:0;  }  
            .l-page-top{ height:40px; background:#f8f8f8; margin-bottom:3px;}
        </style>
    </head>
    <body style="padding:10px">  
      <div id="layout1">
            <form>
                <div id="queue"></div>
                <input id="file_upload" name="file_upload" type="file" multiple="true">
            </form>                
          <div position="centerbottom" title="下方区域" id="log">
              
          </div>  
        </div> 
        <script src="__PUBLIC__/lib/jquery/jquery-1.9.0.min.js" type="text/javascript"></script>   
    	<script src="__PUBLIC__/lib/ligerUI/js/core/base.js" type="text/javascript"></script>
        <script src="__PUBLIC__/lib/ligerUI/js/plugins/ligerLayout.js" type="text/javascript"></script>
        <script src="__PUBLIC__/uploadify/jquery.uploadify.min.js" type="text/javascript"></script>
    </body>
 	<script type="text/javascript">

                $(function ()
                {

                    $("#layout1").ligerLayout({
                        leftWidth: 200,
                        centerBottomHeight:180
                    });
                });
                
     </script> 
     <script type="text/javascript">
 	 	var filename ;
 	 	var myDate = new Date();
	    <?php $timestamp = time();?>
	    $(function() {
	      $('#file_upload').uploadify({
	        'formData'     : {
	          'timestamp' : '<?php echo $timestamp;?>',
	          'token'     : '<?php echo md5('unique_salt' . $timestamp);?>'
	        },
	        'swf'      : '__PUBLIC__/uploadify/uploadify.swf',
	        'uploader' : '{:U('Home/Index/UploadFile')}',
	        'fileTypeExts' : '*.xls; *.xlsx',

	        'onUploadSuccess' : function(file, data, response) {
	            filename= file.name;
	            var oldmsg = $('#log').html();
	            $('#log').html(
	            	oldmsg+"<p>"+myDate.toLocaleString()+" 导入("+filename+")文件成功,请在核对数据之前对导入数据进行整理</p>"
	            	);
	          }
	          
	      });
	    });
  	</script>
    </html>
